<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="jstl-fn" prefix="fn" %>
<%@ taglib prefix="c" uri="jstl"%>
<jsp:include page="Templates/metas.jsp"/>
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->
		
		<jsp:include page="Templates/headerEng.jsp"/>
		
		<div id="container_aside">
		<span id="node_chat_njsd" class="ico_chat"></span>
       <jsp:include page="Templates/submenu_miredpostEng.jsp"/>
       
        <section id="container_right">
        	<h1 class="mine_title"><img src="img/shadow_title.png" class="shadow_mineTit">MY REDPOST</h1>
				<h2 class="subtitle txt_blue underline">SHIPMENT DETAILS <span class="left_buttons"><a href="#" onclick="window.print()"><img alt="ico_verDatella" src="img/ico_print.png"><span class="link_blue">Print</span></a></span></h2>
				<table class="table_reg2 ">
					<tr>
						<td width="33%">
							Description: <span class="txt_gray">${Datos.descripcion}</span>
							<br>
							Arrival waybill: <span class="txt_gray">${Datos.gArribo}</span>
							<br>
							Redpack waybill: <span class="txt_gray">${Guia}</span>
							<br>
							Order no: <span class="txt_gray">${Datos.cveArribo}</span>
							<br>
							Number of pieces: <span class="txt_gray">${Npack}</span>
						</td>
						<td width="33%">
							Declared value (CIF): <span class="txt_gray">$${Datos.valorDeclarado} USD</span> 
							<br>
							Import taxes: <span class="txt_gray">$ ${Datos.impuestos }</span>
							<br>
							Freight: <span class="txt_gray">$${Datos.envio}</span>
							<br>
							Handling: <span class="txt_gray">$${Datos.manejo}</span>
							<br>
							Additional charges: <span class="txt_gray">$${Datos.adicionales}</span>
						</td>
						<td width="33%">
							Transport insurance: <span class="txt_gray">$${Datos.seguro}</span>
							<br>
							Storage: <span class="txt_gray">$${Datos.almacenaje}</span>
							<br>
							Total: <span class="txt_red">$${Datos.totalPagado}</span>
							<br>
							Laredo, Texas status: <span class="txt_red">${Datos.status}</span>
						</td>
					</tr>
					<c:if test="${Npack ne 0 }">
						<c:forEach items="${Paquetes}" var="pack" varStatus="pSt">
						<tr>
							<td>Piece: <span class="txt_gray">${pSt.count}</span></td>
							<td>Weight: <span class="txt_gray">${pack.peso_real_kg}Kg</span></td>
							<td>Dimensions: <span class="txt_gray">${pack.largo_dim_paq_cm} x ${pack.ancho_dim_paq_cm} x ${pack.alto_dim_paq_cm} cm </span></td>
						</tr>
						</c:forEach>						
					</c:if>					
				</table>				
				
				<c:if test="${Rastreo ne 0}">
				<table class="table_reg2">
					<tr>
						<td align="center">&nbsp;</td>
						<td align="center">Date of documentation: <span class="txt_gray">${FecDocum}</span> </td>
						<td align="center">Origin: <span class="txt_gray">USA</span> </td>
					</tr>
					<tr>
						<td align="center">Destination: <span class="txt_gray">${Destino}</span></td>
						<td align="center">Shipment status: <span class="txt_gray">${Estado}</span> </td>
						<td align="center">Delivery date: <span class="txt_gray">${FecEntrega}</span> </td>
					</tr>
					<tr>
						<td align="center">Hour: <span class="txt_gray"></span></td>
						<td align="center">Received by: <span class="txt_gray">${recibio}</span> </td>
						<td align="center"> <span class="txt_gray"></span></td>
					</tr>															
				</table>
				<table class="table_reg2">
					<tr>
						<td align="center">DATE</td>
						<td align="center">HOUR</td>
						<td align="center">LOCATION</td>
						<td align="center">STATUS</td>
						<td align="center">OBSERVATIONS</td>
					</tr>
					<c:if test="${Numlog ne 0}">
						<c:forEach items="${Log}" var="log">
							<tr>
								<td align="center"><span class="txt_gray">${log.fecha}</span></td>
								<td align="center"><span class="txt_gray"> ${log.hora} </span></td>
								<td align="center"><span class="txt_gray">${log.estado}</span></td>
								<td align="center"><span class="txt_gray">${log.status}</span></td>
								<td align="center"><span class="txt_gray">${log.comentario}</span></td>
							</tr>
						</c:forEach>
					</c:if>
					<c:forEach items="${Detalles}" var="det">
					<tr>
						<td align="center"><span class="txt_gray">${det.fechaEvento}</span></td>
						<td align="center"> <span class="txt_gray"></span> </td>
						<td align="center"><span class="txt_gray">${det.localizacion}</span></td>
						<td align="center"> <span class="txt_gray">${det.evento}</span> </td>
						<td align="center"><span class="txt_gray">${det.observaciones}</span></td>
					</tr>
					</c:forEach>										
				</table>
				</c:if>
				<br>
				<c:if test="${NumFiles ne 0}">
				<table class="table_reg2">
					<tr>
						<td align="center">Documents</td>
						<c:forEach items="${Archivos}" var="file" varStatus="fSt">
							<c:if test="${file.cve_tipo_archivo eq 1 }">
								<td align="center">
									<a href="${url_multimedia}${file.nom_archivo}" target="_blank"> Document ${fSt.count}</a>
									&nbsp;&nbsp<img src="img/btn_close.png" style="cursor:pointer;" onclick="delArchivo(${file.cve_Archivo });" >
								</td>
							</c:if>										
						</c:forEach>						
					</tr>
				</table>
				<table class="table_reg2">
					<tr>
						<td align="center">Photos</td>
						<c:forEach items="${Fotos}" var="fileb" varStatus="fStb">
							<c:if test="${fileb.cve_tipo_archivo eq 2 }">
								<td align="center">
									<a href="${url_multimedia}${fileb.nom_archivo}" target="_blank"> Photo ${fStb.count} </a>
									&nbsp;&nbsp<img src="img/btn_close.png" style="cursor:pointer;" onclick="delArchivo(${fileb.cve_Archivo });" >
								</td>
							</c:if>										
						</c:forEach>						
					</tr>
				</table>
				</c:if>
				<div class="buttons_right">
					<a href="javascript:history.back(1)"><img src="img/btn_regresarEng.png" border="0" alt="btn_regresar"></a>
				</div>
        </section>
        <span class="clear"></span>
        <script type="text/javascript">
        	function delArchivo(cve){
				document.getElementById("cve_Archivo").value=cve;
				document.forms['generalForm'].submit();
				return false;
            }
        </script>
        <html:form action="/mis_envios_detalle.do">
        	<html:hidden property="bandera" value="99"/>
        	<html:hidden property="num" value="${num}"/>
        	<html:hidden property="cve_Archivo" styleId="cve_Archivo" value="0"/>
        </html:form>
        </div>
        
<jsp:include page="Templates/footerEng.jsp"/>